import request from '@/utils/request'

// 查询权限管理列表
export function listSalespermission(query) {
  return request({
    url: '/permission/salespermission/list',
    method: 'get',
    params: query
  })
}

//查询权限移交列表
export function transListSalespermission(query){
  return request({
    url: '/permission/salespermission/transList',
    method:'get',
    params:query
  })
}


// 查询权限管理详细
export function getSalespermission(guid) {
  return request({
    url: '/permission/salespermission/' + guid,
    method: 'get'
  })
}

// 新增权限管理
export function addSalespermission(data) {
  return request({
    url: '/permission/salespermission',
    method: 'post',
    data: data
  })
}

// 修改权限管理
export function updateSalespermission(data) {
  return request({
    url: '/permission/salespermission',
    method: 'put',
    data: data
  })
}

// 删除权限管理
export function delSalespermission(guid) {
  return request({
    url: '/permission/salespermission/' + guid,
    method: 'delete'
  })
}

// 导出权限管理
export function exportSalespermission(query) {
  return request({
    url: '/permission/salespermission/export',
    method: 'get',
    params: query
  })
}
//权限移交
export function usertransfer(data){
  return request({
    url:'/permission/salespermission/usertransfer',
    method:'post',
    params:data,
  })
}

//权限移交
export function trans(data){
  return request({
    url:'/permission/salespermission/trans',
    method:'post',
    params:data,
  })
}

